<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        section{
            width: 500px;
            height: 500px;
            border: 1px solid red;
            margin: 50px auto 0;
            position: relative;
        }
        div{
            width: 300px;
            height: 300px;
            background-color: yellow;
            line-height: 300px;
            text-align: center;
            font-size: 50px;
            font-weight: 800;
            backface-visibility: hidden;
            position: absolute;
        }
        div:nth-child(2){
            transform: rotateY(180deg);
            background-color: pink;
            transition: 0.3s;
        }
        section:hover div:nth-child(1){
            transform: rotateY(180deg);
        }
        section:hover div:nth-child(2){
            transform: rotateY(360deg);
        }
    </style>
</head>
<body>
    <section>
        <div>正</div>
        <div>反</div>
    </section>
</body>
</html>